package com.chagee.store.operation.server.utils;

import com.alibaba.ttl.TransmittableThreadLocal;

public class MybatisTenantContext {
    private static final ThreadLocal<Boolean> TENANT_CONTEXT_THREAD_LOCAL = new TransmittableThreadLocal<>();

    public static Boolean get() {
        return TENANT_CONTEXT_THREAD_LOCAL.get();
    }

    public static void set(boolean isIgnore){
        TENANT_CONTEXT_THREAD_LOCAL.set(isIgnore);
    }

	public static void remove(){
		TENANT_CONTEXT_THREAD_LOCAL.remove();
	}

    public static void clear(){
        TENANT_CONTEXT_THREAD_LOCAL.remove();
    }
}
